import httpRequest from "@/http"
import { type MyResponseType } from "@/bean/base/response";
import { type MyPageResponseType } from "@/bean/base/page";
import { MyBaseType } from "@/bean/base/baseType";


export const getTypesByCodeApi = (params:Object) => {
    return httpRequest.postLink<MyResponseType<Array<MyBaseType>>>("/comType/getTypesByCode",params);
}

export const typeListApi = (params:Object) => {
    return httpRequest.post<MyResponseType<MyPageResponseType<MyBaseType>>>("/comType/list",params);
}


export const addTypeApi = (params:Object) => {
    return httpRequest.post<MyResponseType<object>>("/comType/add",params);
}


export const updateTypeApi = (params:Object) => {
    return httpRequest.post<MyResponseType<object>>("/comType/update",params);
}

export const delTypeApi = (params:Number) => {
    return httpRequest.postLink<MyResponseType<object>>(`/comType/delete`,params);
}